"string_name = string_name[3..-1]" what could the following line of ruby code mean?
Posted
by Mo
on Stack Overflow
See other posts from Stack Overflow
or by Mo
Published on 2010-05-07T15:08:11Z
Indexed on
2010/05/07
19:28 UTC
Read the original article
Hit count: 236
Hi,
I'm looking at some external code and saw a line of Ruby code that looks like this
string_name = string_name[3..-1]
what does the [n..-x]
do or mean?
Thanks.
© Stack Overflow or respective owner